package com.feng.gaoerfu.base;

import android.app.Application;
import android.content.Context;

import com.feng.gaoerfu.bean.BallPersonData;
import com.feng.gaoerfu.bean.ContactPerson;
import com.feng.gaoerfu.bean.GolfHoleBean;
import com.feng.gaoerfu.bean.TableData;
import com.feng.gaoerfu.utils.SharedPreferencesHelper;

import java.util.ArrayList;

/**
 * @time 2017/8/9 0009 12:01
 */

public class App extends Application {

    public static int WIDTH = 0;
    public static int HEIGHT = 0;
    public static Context mContext;
    public static SharedPreferencesHelper mSpHelper;
    //联系人列表
    public static ArrayList<ContactPerson> mContactList;
    //选中球员的集合
    public static ArrayList<BallPersonData> mPersonList;

    //球洞数据
    public static ArrayList<GolfHoleBean> mGolfHoleList;
    //表格数据
    public static ArrayList<ArrayList<TableData>> mTableLists;

    //开球时间
    public static String mOpenTime;
    //球场名称
    public static String mBallCourt;


    //应用区高度
    public static int mUserHeight;
    @Override
    public void onCreate() {
        super.onCreate();
        mContext = getContext();
        mSpHelper = SharedPreferencesHelper.getInstance(this);
        init();
    }

    private void init() {
        mTableLists = new ArrayList<>();
        mPersonList = new ArrayList<>();
        //初始化球洞数据
        mGolfHoleList = new ArrayList<>();
        mGolfHoleList.add(new GolfHoleBean("A1", 4, 539));
        mGolfHoleList.add(new GolfHoleBean("A2", 5, 296));
        mGolfHoleList.add(new GolfHoleBean("A3", 4, 405));
        mGolfHoleList.add(new GolfHoleBean("A4", 4, 383));
        mGolfHoleList.add(new GolfHoleBean("A5", 5, 491));
        mGolfHoleList.add(new GolfHoleBean("A6", 6, 365));
        mGolfHoleList.add(new GolfHoleBean("B1", 4, 335));
        mGolfHoleList.add(new GolfHoleBean("B2", 3, 125));
        mGolfHoleList.add(new GolfHoleBean("B3", 4, 559));
        mGolfHoleList.add(new GolfHoleBean("B4", 4, 599));
        mGolfHoleList.add(new GolfHoleBean("B5", 5, 549));
        mGolfHoleList.add(new GolfHoleBean("B6", 6, 569));
    }



    public Context getContext() {
        return getApplicationContext();
    }


}
